package redisx

import (
	"context"
	"time"

	red "github.com/go-redis/redis/v8"
)

type (
	CommandInfo = red.CommandInfo
	Sort        = red.Sort
	SetArgs     = red.SetArgs
	BitCount    = red.BitCount
	LPosArgs    = red.LPosArgs
	Z           = red.Z
	ZAddArgs    = red.ZAddArgs
	ZRangeArgs  = red.ZRangeArgs
	ZRangeBy    = red.ZRangeBy
	ZStore      = red.ZStore
)

type Cmdable interface {
	Command() (map[string]*CommandInfo, error)
	CommandCtx(ctx context.Context) (map[string]*CommandInfo, error)
	ClientGetName() (string, error)
	ClientGetNameCtx(ctx context.Context) (string, error)
	Echo(message interface{}) (string, error)
	EchoCtx(ctx context.Context, message interface{}) (string, error)
	Ping() (string, error)
	PingCtx(ctx context.Context) (string, error)
	Del(keys ...string) (int64, error)
	DelCtx(ctx context.Context, keys ...string) (int64, error)
	Unlink(keys ...string) (int64, error)
	UnlinkCtx(ctx context.Context, keys ...string) (int64, error)
	Dump(key string) (string, error)
	DumpCtx(ctx context.Context, key string) (string, error)
	Exists(keys ...string) (int64, error)
	ExistsCtx(ctx context.Context, keys ...string) (int64, error)
	Expire(key string, expiration time.Duration) (bool, error)
	ExpireCtx(ctx context.Context, key string, expiration time.Duration) (bool, error)
	ExpireAt(key string, tm time.Time) (bool, error)
	ExpireAtCtx(ctx context.Context, key string, tm time.Time) (bool, error)
	ExpireNX(key string, expiration time.Duration) (bool, error)
	ExpireNXCtx(ctx context.Context, key string, expiration time.Duration) (bool, error)
	ExpireXX(key string, expiration time.Duration) (bool, error)
	ExpireXXCtx(ctx context.Context, key string, expiration time.Duration) (bool, error)
	ExpireGT(key string, expiration time.Duration) (bool, error)
	ExpireGTCtx(ctx context.Context, key string, expiration time.Duration) (bool, error)
	ExpireLT(key string, expiration time.Duration) (bool, error)
	ExpireLTCtx(ctx context.Context, key string, expiration time.Duration) (bool, error)
	Keys(pattern string) ([]string, error)
	KeysCtx(ctx context.Context, pattern string) ([]string, error)
	Migrate(host, port, key string, db int, timeout time.Duration) (string, error)
	MigrateCtx(ctx context.Context, host, port, key string, db int, timeout time.Duration) (string, error)
	Move(key string, db int) (bool, error)
	MoveCtx(ctx context.Context, key string, db int) (bool, error)
	ObjectRefCount(key string) (int64, error)
	ObjectRefCountCtx(ctx context.Context, key string) (int64, error)
	ObjectEncoding(key string) (string, error)
	ObjectEncodingCtx(ctx context.Context, key string) (string, error)
	ObjectIdleTime(key string) (time.Duration, error)
	ObjectIdleTimeCtx(ctx context.Context, key string) (time.Duration, error)
	Persist(key string) (bool, error)
	PersistCtx(ctx context.Context, key string) (bool, error)
	PExpire(key string, expiration time.Duration) (bool, error)
	PExpireCtx(ctx context.Context, key string, expiration time.Duration) (bool, error)
	PExpireAt(key string, tm time.Time) (bool, error)
	PExpireAtCtx(ctx context.Context, key string, tm time.Time) (bool, error)
	PTTL(key string) (time.Duration, error)
	PTTLCtx(ctx context.Context, key string) (time.Duration, error)
	RandomKey() (string, error)
	RandomKeyCtx(ctx context.Context) (string, error)
	Rename(key, newkey string) (string, error)
	RenameCtx(ctx context.Context, key, newkey string) (string, error)
	RenameNX(key, newkey string) (bool, error)
	RenameNXCtx(ctx context.Context, key, newkey string) (bool, error)
	Restore(key string, ttl time.Duration, value string) (string, error)
	RestoreCtx(ctx context.Context, key string, ttl time.Duration, value string) (string, error)
	RestoreReplace(key string, ttl time.Duration, value string) (string, error)
	RestoreReplaceCtx(ctx context.Context, key string, ttl time.Duration, value string) (string, error)
	Sort(key string, sort *Sort) ([]string, error)
	SortCtx(ctx context.Context, key string, sort *Sort) ([]string, error)
	SortStore(key, store string, sort *Sort) (int64, error)
	SortStoreCtx(ctx context.Context, key, store string, sort *Sort) (int64, error)
	SortInterfaces(key string, sort *Sort) ([]interface{}, error)
	SortInterfacesCtx(ctx context.Context, key string, sort *Sort) ([]interface{}, error)
	Touch(keys ...string) (int64, error)
	TouchCtx(ctx context.Context, keys ...string) (int64, error)
	TTL(key string) (time.Duration, error)
	TTLCtx(ctx context.Context, key string) (time.Duration, error)
	Type(key string) (string, error)
	TypeCtx(ctx context.Context, key string) (string, error)
	Append(key, value string) (int64, error)
	AppendCtx(ctx context.Context, key, value string) (int64, error)
	Decr(key string) (int64, error)
	DecrCtx(ctx context.Context, key string) (int64, error)
	DecrBy(key string, decrement int64) (int64, error)
	DecrByCtx(ctx context.Context, key string, decrement int64) (int64, error)
	Get(key string) (string, error)
	GetCtx(ctx context.Context, key string) (string, error)
	GetRange(key string, start, end int64) (string, error)
	GetRangeCtx(ctx context.Context, key string, start, end int64) (string, error)
	GetSet(key string, value interface{}) (string, error)
	GetSetCtx(ctx context.Context, key string, value interface{}) (string, error)
	GetEx(key string, expiration time.Duration) (string, error)
	GetExCtx(ctx context.Context, key string, expiration time.Duration) (string, error)
	GetDel(key string) (string, error)
	GetDelCtx(ctx context.Context, key string) (string, error)
	Incr(key string) (int64, error)
	IncrCtx(ctx context.Context, key string) (int64, error)
	IncrBy(key string, value int64) (int64, error)
	IncrByCtx(ctx context.Context, key string, value int64) (int64, error)
	IncrByFloat(key string, value float64) (float64, error)
	IncrByFloatCtx(ctx context.Context, key string, value float64) (float64, error)
	MGet(keys ...string) ([]interface{}, error)
	MGetCtx(ctx context.Context, keys ...string) ([]interface{}, error)
	MSet(values ...interface{}) (string, error)
	MSetCtx(ctx context.Context, values ...interface{}) (string, error)
	MSetNX(values ...interface{}) (bool, error)
	MSetNXCtx(ctx context.Context, values ...interface{}) (bool, error)
	Set(key string, value interface{}, expiration time.Duration) (string, error)
	SetCtx(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
	SetArgs(key string, value interface{}, a SetArgs) (string, error)
	SetArgsCtx(ctx context.Context, key string, value interface{}, a SetArgs) (string, error)
	SetEX(key string, value interface{}, expiration time.Duration) (string, error)
	SetEXCtx(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
	SetNX(key string, value interface{}, expiration time.Duration) (bool, error)
	SetNXCtx(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
	SetXX(key string, value interface{}, expiration time.Duration) (bool, error)
	SetXXCtx(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
	SetRange(key string, offset int64, value string) (int64, error)
	SetRangeCtx(ctx context.Context, key string, offset int64, value string) (int64, error)
	StrLen(key string) (int64, error)
	StrLenCtx(ctx context.Context, key string) (int64, error)
	Copy(sourceKey string, destKey string, db int, replace bool) (int64, error)
	CopyCtx(ctx context.Context, sourceKey string, destKey string, db int, replace bool) (int64, error)
	GetBit(key string, offset int64) (int64, error)
	GetBitCtx(ctx context.Context, key string, offset int64) (int64, error)
	SetBit(key string, offset int64, value int) (int64, error)
	SetBitCtx(ctx context.Context, key string, offset int64, value int) (int64, error)
	BitCount(key string, bitCount *BitCount) (int64, error)
	BitCountCtx(ctx context.Context, key string, bitCount *BitCount) (int64, error)
	BitOpAnd(destKey string, keys ...string) (int64, error)
	BitOpAndCtx(ctx context.Context, destKey string, keys ...string) (int64, error)
	BitOpOr(destKey string, keys ...string) (int64, error)
	BitOpOrCtx(ctx context.Context, destKey string, keys ...string) (int64, error)
	BitOpXor(destKey string, keys ...string) (int64, error)
	BitOpXorCtx(ctx context.Context, destKey string, keys ...string) (int64, error)
	BitOpNot(destKey string, key string) (int64, error)
	BitOpNotCtx(ctx context.Context, destKey string, key string) (int64, error)
	BitPos(key string, bit int64, pos ...int64) (int64, error)
	BitPosCtx(ctx context.Context, key string, bit int64, pos ...int64) (int64, error)
	BitField(key string, args ...interface{}) ([]int64, error)
	BitFieldCtx(ctx context.Context, key string, args ...interface{}) ([]int64, error)
	Scan(cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	ScanCtx(ctx context.Context, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	ScanType(cursor uint64, match string, count int64, keyType string) (keys []string, cur uint64, err error)
	ScanTypeCtx(ctx context.Context, cursor uint64, match string, count int64, keyType string) (keys []string, cur uint64, err error)
	SScan(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	SScanCtx(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	HScan(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	HScanCtx(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	ZScan(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	ZScanCtx(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	HDel(key string, fields ...string) (int64, error)
	HDelCtx(ctx context.Context, key string, fields ...string) (int64, error)
	HExists(key, field string) (bool, error)
	HExistsCtx(ctx context.Context, key, field string) (bool, error)
	HGet(key, field string) (string, error)
	HGetCtx(ctx context.Context, key, field string) (string, error)
	HGetAll(key string) (map[string]string, error)
	HGetAllCtx(ctx context.Context, key string) (map[string]string, error)
	HIncrBy(key, field string, incr int64) (int64, error)
	HIncrByCtx(ctx context.Context, key, field string, incr int64) (int64, error)
	HIncrByFloat(key, field string, incr float64) (float64, error)
	HIncrByFloatCtx(ctx context.Context, key, field string, incr float64) (float64, error)
	HKeys(key string) ([]string, error)
	HKeysCtx(ctx context.Context, key string) ([]string, error)
	HLen(key string) (int64, error)
	HLenCtx(ctx context.Context, key string) (int64, error)
	HMGet(key string, fields ...string) ([]interface{}, error)
	HMGetCtx(ctx context.Context, key string, fields ...string) ([]interface{}, error)
	HSet(key string, values ...interface{}) (int64, error)
	HSetCtx(ctx context.Context, key string, values ...interface{}) (int64, error)
	HMSet(key string, values ...interface{}) (bool, error)
	HMSetCtx(ctx context.Context, key string, values ...interface{}) (bool, error)
	HSetNX(key, field string, value interface{}) (bool, error)
	HSetNXCtx(ctx context.Context, key, field string, value interface{}) (bool, error)
	HVals(key string) ([]string, error)
	HValsCtx(ctx context.Context, key string) ([]string, error)
	HRandField(key string, count int, withValues bool) ([]string, error)
	HRandFieldCtx(ctx context.Context, key string, count int, withValues bool) ([]string, error)
	BLPop(timeout time.Duration, keys ...string) ([]string, error)
	BLPopCtx(ctx context.Context, timeout time.Duration, keys ...string) ([]string, error)
	BRPop(timeout time.Duration, keys ...string) ([]string, error)
	BRPopCtx(ctx context.Context, timeout time.Duration, keys ...string) ([]string, error)
	BRPopLPush(source, destination string, timeout time.Duration) (string, error)
	BRPopLPushCtx(ctx context.Context, source, destination string, timeout time.Duration) (string, error)
	LIndex(key string, index int64) (string, error)
	LIndexCtx(ctx context.Context, key string, index int64) (string, error)
	LInsert(key, op string, pivot, value interface{}) (int64, error)
	LInsertCtx(ctx context.Context, key, op string, pivot, value interface{}) (int64, error)
	LInsertBefore(key string, pivot, value interface{}) (int64, error)
	LInsertBeforeCtx(ctx context.Context, key string, pivot, value interface{}) (int64, error)
	LInsertAfter(key string, pivot, value interface{}) (int64, error)
	LInsertAfterCtx(ctx context.Context, key string, pivot, value interface{}) (int64, error)
	LLen(key string) (int64, error)
	LLenCtx(ctx context.Context, key string) (int64, error)
	LPop(key string) (string, error)
	LPopCtx(ctx context.Context, key string) (string, error)
	LPopCount(key string, count int) ([]string, error)
	LPopCountCtx(ctx context.Context, key string, count int) ([]string, error)
	LPos(key string, value string, args LPosArgs) (int64, error)
	LPosCtx(ctx context.Context, key string, value string, args LPosArgs) (int64, error)
	LPosCount(key string, value string, count int64, args LPosArgs) ([]int64, error)
	LPosCountCtx(ctx context.Context, key string, value string, count int64, args LPosArgs) ([]int64, error)
	LPush(key string, values ...interface{}) (int64, error)
	LPushCtx(ctx context.Context, key string, values ...interface{}) (int64, error)
	LPushX(key string, values ...interface{}) (int64, error)
	LPushXCtx(ctx context.Context, key string, values ...interface{}) (int64, error)
	LRange(key string, start, stop int64) ([]string, error)
	LRangeCtx(ctx context.Context, key string, start, stop int64) ([]string, error)
	LRem(key string, count int64, value interface{}) (int64, error)
	LRemCtx(ctx context.Context, key string, count int64, value interface{}) (int64, error)
	LSet(key string, index int64, value interface{}) (string, error)
	LSetCtx(ctx context.Context, key string, index int64, value interface{}) (string, error)
	LTrim(key string, start, stop int64) (string, error)
	LTrimCtx(ctx context.Context, key string, start, stop int64) (string, error)
	RPop(key string) (string, error)
	RPopCtx(ctx context.Context, key string) (string, error)
	RPopCount(key string, count int) ([]string, error)
	RPopCountCtx(ctx context.Context, key string, count int) ([]string, error)
	RPopLPush(source, destination string) (string, error)
	RPopLPushCtx(ctx context.Context, source, destination string) (string, error)
	RPush(key string, values ...interface{}) (int64, error)
	RPushCtx(ctx context.Context, key string, values ...interface{}) (int64, error)
	RPushX(key string, values ...interface{}) (int64, error)
	RPushXCtx(ctx context.Context, key string, values ...interface{}) (int64, error)
	LMove(source, destination, srcpos, destpos string) (string, error)
	LMoveCtx(ctx context.Context, source, destination, srcpos, destpos string) (string, error)
	BLMove(source, destination, srcpos, destpos string, timeout time.Duration) (string, error)
	BLMoveCtx(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) (string, error)
	SAdd(key string, members ...interface{}) (int64, error)
	SAddCtx(ctx context.Context, key string, members ...interface{}) (int64, error)
	SCard(key string) (int64, error)
	SCardCtx(ctx context.Context, key string) (int64, error)
	SDiff(keys ...string) ([]string, error)
	SDiffCtx(ctx context.Context, keys ...string) ([]string, error)
	SDiffStore(destination string, keys ...string) (int64, error)
	SDiffStoreCtx(ctx context.Context, destination string, keys ...string) (int64, error)
	SInter(keys ...string) ([]string, error)
	SInterCtx(ctx context.Context, keys ...string) ([]string, error)
	SInterStore(destination string, keys ...string) (int64, error)
	SInterStoreCtx(ctx context.Context, destination string, keys ...string) (int64, error)
	SIsMember(key string, member interface{}) (bool, error)
	SIsMemberCtx(ctx context.Context, key string, member interface{}) (bool, error)
	SMIsMember(key string, members ...interface{}) ([]bool, error)
	SMIsMemberCtx(ctx context.Context, key string, members ...interface{}) ([]bool, error)
	SMembers(key string) ([]string, error)
	SMembersCtx(ctx context.Context, key string) ([]string, error)
	SMembersMap(key string) (map[string]struct{}, error)
	SMembersMapCtx(ctx context.Context, key string) (map[string]struct{}, error)
	SMove(source, destination string, member interface{}) (bool, error)
	SMoveCtx(ctx context.Context, source, destination string, member interface{}) (bool, error)
	SPop(key string) (string, error)
	SPopCtx(ctx context.Context, key string) (string, error)
	SPopN(key string, count int64) ([]string, error)
	SPopNCtx(ctx context.Context, key string, count int64) ([]string, error)
	SRandMember(key string) (string, error)
	SRandMemberCtx(ctx context.Context, key string) (string, error)
	SRandMemberN(key string, count int64) ([]string, error)
	SRandMemberNCtx(ctx context.Context, key string, count int64) ([]string, error)
	SRem(key string, members ...interface{}) (int64, error)
	SRemCtx(ctx context.Context, key string, members ...interface{}) (int64, error)
	SUnion(keys ...string) ([]string, error)
	SUnionCtx(ctx context.Context, keys ...string) ([]string, error)
	SUnionStore(destination string, keys ...string) (int64, error)
	SUnionStoreCtx(ctx context.Context, destination string, keys ...string) (int64, error)
	ZAdd(key string, members ...*Z) (int64, error)
	ZAddCtx(ctx context.Context, key string, members ...*Z) (int64, error)
	ZAddNX(key string, members ...*Z) (int64, error)
	ZAddNXCtx(ctx context.Context, key string, members ...*Z) (int64, error)
	ZAddXX(key string, members ...*Z) (int64, error)
	ZAddXXCtx(ctx context.Context, key string, members ...*Z) (int64, error)
	ZAddCh(key string, members ...*Z) (int64, error)
	ZAddChCtx(ctx context.Context, key string, members ...*Z) (int64, error)
	ZAddNXCh(key string, members ...*Z) (int64, error)
	ZAddNXChCtx(ctx context.Context, key string, members ...*Z) (int64, error)
	ZAddXXCh(key string, members ...*Z) (int64, error)
	ZAddXXChCtx(ctx context.Context, key string, members ...*Z) (int64, error)
	ZAddArgs(key string, args ZAddArgs) (int64, error)
	ZAddArgsCtx(ctx context.Context, key string, args ZAddArgs) (int64, error)
	ZAddArgsIncr(key string, args ZAddArgs) (float64, error)
	ZAddArgsIncrCtx(ctx context.Context, key string, args ZAddArgs) (float64, error)
	ZIncr(key string, member *Z) (float64, error)
	ZIncrCtx(ctx context.Context, key string, member *Z) (float64, error)
	ZIncrNX(key string, member *Z) (float64, error)
	ZIncrNXCtx(ctx context.Context, key string, member *Z) (float64, error)
	ZIncrXX(key string, member *Z) (float64, error)
	ZIncrXXCtx(ctx context.Context, key string, member *Z) (float64, error)
	ZCard(key string) (int64, error)
	ZCardCtx(ctx context.Context, key string) (int64, error)
	ZCount(key, min, max string) (int64, error)
	ZCountCtx(ctx context.Context, key, min, max string) (int64, error)
	ZLexCount(key, min, max string) (int64, error)
	ZLexCountCtx(ctx context.Context, key, min, max string) (int64, error)
	ZIncrBy(key string, increment float64, member string) (float64, error)
	ZIncrByCtx(ctx context.Context, key string, increment float64, member string) (float64, error)
	ZInter(store *ZStore) ([]string, error)
	ZInterCtx(ctx context.Context, store *ZStore) ([]string, error)
	ZInterWithScores(store *ZStore) ([]Z, error)
	ZInterWithScoresCtx(ctx context.Context, store *ZStore) ([]Z, error)
	ZInterStore(destination string, store *ZStore) (int64, error)
	ZInterStoreCtx(ctx context.Context, destination string, store *ZStore) (int64, error)
	ZMScore(key string, members ...string) ([]float64, error)
	ZMScoreCtx(ctx context.Context, key string, members ...string) ([]float64, error)
	ZPopMax(key string, count ...int64) ([]Z, error)
	ZPopMaxCtx(ctx context.Context, key string, count ...int64) ([]Z, error)
	ZPopMin(key string, count ...int64) ([]Z, error)
	ZPopMinCtx(ctx context.Context, key string, count ...int64) ([]Z, error)
	ZRange(key string, start, stop int64) ([]string, error)
	ZRangeCtx(ctx context.Context, key string, start, stop int64) ([]string, error)
	ZRangeWithScores(key string, start, stop int64) ([]Z, error)
	ZRangeWithScoresCtx(ctx context.Context, key string, start, stop int64) ([]Z, error)
	ZRangeByScore(key string, opt *ZRangeBy) ([]string, error)
	ZRangeByScoreCtx(ctx context.Context, key string, opt *ZRangeBy) ([]string, error)
	ZRangeByLex(key string, opt *ZRangeBy) ([]string, error)
	ZRangeByLexCtx(ctx context.Context, key string, opt *ZRangeBy) ([]string, error)
	ZRangeByScoreWithScores(key string, opt *ZRangeBy) ([]Z, error)
	ZRangeByScoreWithScoresCtx(ctx context.Context, key string, opt *ZRangeBy) ([]Z, error)
	ZRangeArgs(z ZRangeArgs) ([]string, error)
	ZRangeArgsCtx(ctx context.Context, z ZRangeArgs) ([]string, error)
	ZRangeArgsWithScores(z ZRangeArgs) ([]Z, error)
	ZRangeArgsWithScoresCtx(ctx context.Context, z ZRangeArgs) ([]Z, error)
	ZRangeStore(dst string, z ZRangeArgs) (int64, error)
	ZRangeStoreCtx(ctx context.Context, dst string, z ZRangeArgs) (int64, error)
	ZRank(key, member string) (int64, error)
	ZRankCtx(ctx context.Context, key, member string) (int64, error)
	ZRem(key string, members ...interface{}) (int64, error)
	ZRemCtx(ctx context.Context, key string, members ...interface{}) (int64, error)
	ZRemRangeByRank(key string, start, stop int64) (int64, error)
	ZRemRangeByRankCtx(ctx context.Context, key string, start, stop int64) (int64, error)
	ZRemRangeByScore(key, min, max string) (int64, error)
	ZRemRangeByScoreCtx(ctx context.Context, key, min, max string) (int64, error)
	ZRemRangeByLex(key, min, max string) (int64, error)
	ZRemRangeByLexCtx(ctx context.Context, key, min, max string) (int64, error)
	ZRevRange(key string, start, stop int64) ([]string, error)
	ZRevRangeCtx(ctx context.Context, key string, start, stop int64) ([]string, error)
	ZRevRangeWithScores(key string, start, stop int64) ([]Z, error)
	ZRevRangeWithScoresCtx(ctx context.Context, key string, start, stop int64) ([]Z, error)
	ZRevRangeByScore(key string, opt *ZRangeBy) ([]string, error)
	ZRevRangeByScoreCtx(ctx context.Context, key string, opt *ZRangeBy) ([]string, error)
	ZRevRangeByLex(key string, opt *ZRangeBy) ([]string, error)
	ZRevRangeByLexCtx(ctx context.Context, key string, opt *ZRangeBy) ([]string, error)
	ZRevRangeByScoreWithScores(key string, opt *ZRangeBy) ([]Z, error)
	ZRevRangeByScoreWithScoresCtx(ctx context.Context, key string, opt *ZRangeBy) ([]Z, error)
	ZRevRank(key, member string) (int64, error)
	ZRevRankCtx(ctx context.Context, key, member string) (int64, error)
	ZScore(key, member string) (float64, error)
	ZScoreCtx(ctx context.Context, key, member string) (float64, error)
	ZUnionStore(dest string, store *ZStore) (int64, error)
	ZUnionStoreCtx(ctx context.Context, dest string, store *ZStore) (int64, error)
	ZUnion(store ZStore) ([]string, error)
	ZUnionCtx(ctx context.Context, store ZStore) ([]string, error)
	ZUnionWithScores(store ZStore) ([]Z, error)
	ZUnionWithScoresCtx(ctx context.Context, store ZStore) ([]Z, error)
	ZRandMember(key string, count int, withScores bool) ([]string, error)
	ZRandMemberCtx(ctx context.Context, key string, count int, withScores bool) ([]string, error)
	ZDiff(keys ...string) ([]string, error)
	ZDiffCtx(ctx context.Context, keys ...string) ([]string, error)
	ZDiffWithScores(keys ...string) ([]Z, error)
	ZDiffWithScoresCtx(ctx context.Context, keys ...string) ([]Z, error)
	ZDiffStore(destination string, keys ...string) (int64, error)
	ZDiffStoreCtx(ctx context.Context, destination string, keys ...string) (int64, error)
	FlushAll() (string, error)
	FlushAllCtx(ctx context.Context) (string, error)
	FlushAllAsync() (string, error)
	FlushAllAsyncCtx(ctx context.Context) (string, error)
	FlushDB() (string, error)
	FlushDBCtx(ctx context.Context) (string, error)
	FlushDBAsync() (string, error)
	FlushDBAsyncCtx(ctx context.Context) (string, error)
	Info(section ...string) (string, error)
	InfoCtx(ctx context.Context, section ...string) (string, error)
	Save() (string, error)
	SaveCtx(ctx context.Context) (string, error)
	Eval(script string, keys []string, args ...interface{}) (interface{}, error)
	EvalCtx(ctx context.Context, script string, keys []string, args ...interface{}) (interface{}, error)
	EvalSha(sha1 string, keys []string, args ...interface{}) (interface{}, error)
	EvalShaCtx(ctx context.Context, sha1 string, keys []string, args ...interface{}) (interface{}, error)
	ScriptExists(hashes ...string) ([]bool, error)
	ScriptExistsCtx(ctx context.Context, hashes ...string) ([]bool, error)
}
